<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<%@ include file="/page/resform.jsp" %>
<script type="text/javascript">
	$(function() {
		$("#form").validate();
	});
</script>
</head>
<body>
	<div class="body-box">
		<div class="rhead">
			<div class="rpos">当前位置: 字典明细 - ${id eq null?'新增':'修改' }</div>
			<div class="clear"></div>
		</div>
		<form method="post" action="${ctx }/dictItem/save" id="form">
			<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1" border="0">
				<input type="hidden" name="id" value="${id}"/>
				<input type="hidden" name="dictCode" value="${dictCode}"/>
				<tr>
					<td width="12%" class="pn-flabel"><span class="pn-frequired">*</span>代码</td>
					<td colspan="1" width="38%" class="pn-fcontent">
					<c:if test="${id eq null }"><input type="text"  name="code" value="${entity.code }" maxlength="20"  validate="{required:true,loginname:true,remote:'${ctx }/dict/dict-item!checkDictItemCode.action',messages:{remote:'此代码已被使用'}}" /></c:if>
					<c:if test="${id ne null }"><input type="hidden"  name="code" value="${entity.code }" maxlength="100"/>${entity.code }</c:if>	
					</td>
					<td width="12%" class="pn-flabel"><span class="pn-frequired">*</span>名称</td>
					<td colspan="1" width="38%" class="pn-fcontent">
						<input type="text"  name="name" value="${entity.name }"  validate="{required:true,maxlength:25}" maxlength="25" />
					</td>					
				</tr>
				<tr>
					<td width="12%" class="pn-flabel">备注</td>
					<td colspan="3" width="88%" class="pn-fcontent">
						<textarea name="remark" maxlength="50">${entity.remark }</textarea>							
					</td>
				</tr>
				<tr>
					<td colspan="4" class="pn-fbutton">
						<input type="button" value="提交" class="ps-btn" onclick="submit()"/> &nbsp; 
						<input type="reset" value="重置" class="ps-btn" />&nbsp; 
						<input type="button" value="返回" class="ps-btn" onclick="history.back();" />
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>